package features.advance.jdk.lang;

import java.util.StringTokenizer;

/**
 * @author LIN
 * @date 2022-05-13 18:01
 */
public class StringTokenizerDemo {

    public static void main(String[] args) {
        StringTokenizer stringTokenizer = new StringTokenizer("this is a test");
//        while (stringTokenizer.hasMoreElements()){
//            System.out.println(stringTokenizer.nextElement());
//        }

        while(stringTokenizer.hasMoreTokens()){
            System.out.println(stringTokenizer.nextToken());
        }
    }

}
